package com.share.device.emqx.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

@Data
@Component
@ConfigurationProperties(prefix = "emqx.device")
public class EmqxProperties {
    // MQTT
    @Value("${emqx.client.clientId}")
    private String clientId;
    // 用户名
    @Value("${emqx.client.username}")
    private String username;
    // 密码
    @Value("${emqx.client.password}")
    private String password;
    // 服务器地址
    @Value("${emqx.client.serverURI}")
    private String serverURI;
    // 心跳间隔
    @Value("${emqx.client.keepAliveInterval}")
    private int keepAliveInterval;
    // 连接超时
    @Value("${emqx.client.connectionTimeout}")
    private int connectionTimeout;
}
